home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 58 / pcpp58a.iso / extras / quake 3 source / Q3A_ToolSource.exe / Main / polyset.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-02  |  788 b   |  31 lines

  1. #ifndef __POLYSET_H__
  2. #define __POLYSET_H__
  3.  
  4. #define POLYSET_MAXTRIANGLES    4096
  5. #define POLYSET_MAXPOLYSETS        64
  6.  
  7. typedef float st_t[2];
  8. typedef float rgb_t[3];
  9.  
  10. typedef struct {
  11.     vec3_t    verts[3];
  12.     vec3_t    normals[3];
  13.     st_t    texcoords[3];
  14. } triangle_t;
  15.  
  16. typedef struct
  17. {
  18.     char name[100];
  19.     char materialname[100];
  20.     triangle_t *triangles;
  21.     int numtriangles;
  22. } polyset_t;
  23.  
  24. polyset_t *Polyset_LoadSets( const char *file, int *numpolysets, int maxTrisPerSet );
  25. polyset_t *Polyset_CollapseSets( polyset_t *psets, int numpolysets );
  26. polyset_t *Polyset_SplitSets( polyset_t *psets, int numpolysets, int *pNumNewPolysets, int maxTris );
  27. void Polyset_SnapSets( polyset_t *psets, int numpolysets );
  28. void Polyset_ComputeNormals( polyset_t *psets, int numpolysets );
  29.  
  30. #endif
  31.